package com.iisigroup.project.statistics.caliberRM.model.internal;

import java.util.HashMap;
import java.util.Map;

public enum CategoryEnum {
    CR("1","客戶需求"), FR("2","需求單元"), FNM("3","功能模組"), CODE("4","程式代碼"), FILE("5","檔案"), TABLE("6","資料庫表格"), ITS("7","測試項目"), TC("8","測試個案");

    CategoryEnum(final String num,final String name) {
	this.value = name;
	this .code = num ; 
    }
    private final String code;
    private final String value; 
    public String getValue() {
	return value;
    }

    public String getCode() {
        return code;
    }

     
    public static CategoryEnum getByCode(int code){
	switch (code) {
	case 1:

	    return CR;
	case 2:

	    return FR;

	case 3:

	    return FNM;
	case 4:

	    return CODE;
	case 5:

	    return FILE;
	case 6:

	    return TABLE;
	case 7:

	    return ITS;
	case 8:

	    return TC;

	default:
	    return CR;
	}
    }
}
